# exerc1.py
def weight_assessment(weights):
    # 计算平均体重
    average = sum(weights) / len(weights)
    print(f"平均体重为: {average:.2f}kg")

    # 找出超出平均体重的小朋友
    overweight = [w for w in weights if w > average]
    print("以下小朋友需要锻炼:")
    for w in overweight:
        print(f"- {w}kg")

    return overweight


if __name__ == "__main__":
    weights = [20.5, 22.3, 18.7, 25.1, 19.8, 23.4, 21.2]
    weight_assessment(weights)